<link href="/theme/Default/css/stalls/stallsPosting.css" rel="stylesheet">
<script src="/theme/Default/js/jquery.validate.js"></script>
<script src="/js/libnumber.js"></script>
<script src="/js/stallsPosting/indexValidate.js"></script>
<form action="/stallsPosting/index" method="post" id="stallsPosting">
	<div id="stalls-posting">
		<div class="posting_header">
			Nội dung Sản Phẩm <span class="posting_notice">(Vui lòng điền đầy đủ thông tin)</span>
		</div>
		<div class="posting_row">
			<div class="posting_label">
				Tên Shop :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<label><?php echo $shop['Shop']['shop_name'] ?></label>
				</div>
			</div>
		</div>

		<div class="posting_row">
			<div class="posting_label">
				Chuyên mục :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<select class="form-control" data-size="8" name="data[category_id]" id="data_category_id">
						<option value="0">Chọn danh mục</option>
					    <?php
						    foreach ($rootCategories as $item){?>
								<optgroup value="<?php echo $item['rootId']?>_" label="<?php echo $item['rootName']?>">
								<?php
								foreach ($item['shopCat'] as $cat){?>
									<option value="<?php echo $cat['catId']?>"><?php echo $cat['category_name']?></option>
								<?php	
								}?>
								</optgroup>
								<?php
						    }
						?>
				  	</select>
				</div>
				<div class="category_group_warntip hide">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Bạn chưa chọn danh mục của tin</span>
			    	</div>
				</div>
			</div>
		</div>

		<div class="posting_row">
			<div class="posting_label">
				Tiêu đề :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<input placeholder="Dùng tiếng việt có dấu" class="form-control" id="data_product_name" name="data[product_name]" type="text" maxlength="50"/>
				</div>
				<div class="category_group_warntip hide" style="display: none;">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Tiêu đề phải dài ít nhất 2 ký tự</span>
			    	</div>
				</div>
			</div>
		</div>
	
		<div class="posting_row">
			<div class="posting_label">
				Giá :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<input placeholder="Giá bạn muốn bán" class="form-control" name="data[price]" type="text" id="data_price" maxlength="15" data-v-max="999999999999" data-v-min="0" data-a-dec="."  data-a-sep=","/>
				</div>
				<div class="element-inline color-defaul">
					<label class="radio-inline">
					  	<input type="radio" name="data[currency_type]" id="radioCurrencyVnd" value="1" checked> VND
					</label>
					<label class="radio-inline">
					  	<input type="radio" name="data[currency_type]" id="radioCurrencyUsd" value="2"> USD
					</label>
				</div>
				<div class="category_group_warntip hide warn-price">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Thiếu giá tiền, vui lòng nhập số</span>
			    	</div>
				</div>
			</div>
		</div>

		<div class="posting_row">
			<div class="posting_label label-top">
				Hình :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<div class="element-images">
						<div class="images-tip">“Trăm nghe không bằng mắt thấy”. Tin có hình được xem nhiều gấp 7 lần. 
							<br><b>ĐĂNG HÌNH ĐỂ BÁN CHẠY HƠN!</b>
						</div>
						<div class="row-3-image">
							<div class="one-image">
								<input class="postImage img1" type="file"/>
								<div class="image-upload">
									<span>Đăng hình</span>
								</div>
								<div id="image-success-1" class="image-up-success" style="display: none">
									<img src="/theme/Default/img/user-login-icon.png"/>
									<div class="remove-image delete1"></div>
								</div>
							</div>
							<div class="one-image">
								<input class="postImage img2" type="file"/>
								<div class="image-upload">
									<span>Đăng hình</span>
								</div>
								<div id="image-success-2" class="image-up-success" style="display: none">
									<img src="/theme/Default/img/user-login-icon.png"/>
									<div class="remove-image delete2"></div>
								</div>
							</div>
							<div class="one-image">
								<input class="postImage img3" type="file"/>
								<div class="image-upload">
									<span>Đăng hình</span>
								</div>
								<div id="image-success-3" class="image-up-success" style="display: none">
									<img src="/theme/Default/img/user-login-icon.png"/>
									<div class="remove-image delete3"></div>
								</div>
							</div>
						</div>
						<div class="row-3-image">
							<div class="one-image">
								<input class="postImage img4" type="file"/>
								<div class="image-upload">
									<span>Đăng hình</span>
								</div>
								<div id="image-success-4" class="image-up-success" style="display: none">
									<img src="/theme/Default/img/user-login-icon.png"/>
									<div class="remove-image delete4"></div>
								</div>
							</div>
							<div class="one-image">
								<input class="postImage img5" type="file"/>
								<div class="image-upload">
									<span>Đăng hình</span>
								</div>
								<div id="image-success-5" class="image-up-success" style="display: none">
									<img src="/theme/Default/img/user-login-icon.png"/>
									<div class="remove-image delete5"></div>
								</div>
							</div>
							<div class="one-image">
								<input class="postImage img6" type="file"/>
								<div class="image-upload">
									<span>Đăng hình</span>
								</div>
								<div id="image-success-6" class="image-up-success" style="display: none">
									<img src="/theme/Default/img/user-login-icon.png"/>
									<div class="remove-image delete5"></div>
								</div>
							</div>
						</div>
					</div>
				</div>
				<div class="category_group_warntip warn-image hide">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Hãy chọn ít nhất 1 hình</span>
			    	</div>
				</div>
			</div>
		</div>

		<div class="posting_row">
			<div class="posting_label">
				Hãng sản xuất :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<input class="form-control" name="data[manufacturer]" type="text" id="data_manufacturer" maxlength="100"/>
				</div>
				<div class="category_group_warntip hide">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Hãy nhập hãng sản xuất</span>
			    	</div>
				</div>
			</div>
		</div>

		<div class="posting_row">
			<div class="posting_label">
				Model :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<input class="form-control" name="data[model]" type="text" id="data_model" maxlength="100"/>
				</div>
				<div class="category_group_warntip hide">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Hãy nhập model</span>
			    	</div>
				</div>
			</div>
		</div>

		<div class="posting_row">
			<div class="posting_label">
				Năm sản xuất :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<input class="form-control" name="data[product_year]" type="text" id="data_product_year" maxlength="4"/>
				</div>
				<div class="category_group_warntip hide">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Hãy nhập năm sản xuất</span>
			    	</div>
				</div>
			</div>
		</div>

		<div class="posting_row">
			<div class="posting_label">
				Tình trạng :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<label class="radio-inline">
					  	<input type="radio" name="data[product_status]" id="radioNew" value="2" checked> Mới 100%
					</label>
					<label class="radio-inline">
					  	<input type="radio" name="data[product_status]" id="radioOld" value="1"> Đã qua sử dụng
					</label>
				</div>
				<div class="category_group_warntip">
					
				</div>
			</div>
		</div>
		
		<div class="posting_row">
			<div class="posting_label">
				Loại sản phẩm :
			</div>
			<div class="posting_element typeProduct">
				<div class="element-main">
					<label class="checkbox-inline">
					  	<input type="checkbox" name="data[best_sell]" id="best_sell" value="2" checked> Sản phẩm bán chạy
					</label>
					<label class="checkbox-inline">
					  	<input type="checkbox" name="data[product_new]" id="product_new" value="1"> Sản phẩm mới nhất
					</label>
				</div>
				<div class="category_group_warntip hide warn-time">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Hãy chọn loại sản phẩm</span>
			    	</div>
				</div>
			</div>
		</div>
		
		<div class="posting_row">
			<div class="posting_label">
				Cung cấp :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<label class="radio-inline">
					  	<input type="radio" name="data[provide]" id="radioProvide" value="1" checked> Sản phẩm đang cung cấp
					</label>
					<label class="radio-inline">
					  	<input type="radio" name="data[provide]" id="radioWarehouse" value="2"> Sản phẩm có tại kho bãi
					</label>
				</div>
				<div class="category_group_warntip">
					
				</div>
			</div>
		</div>
		
		<div class="posting_row">
			<div class="posting_label">
				Thời gian đã hoạt động :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<input class="form-control" name="data[time_used]" type="text" id="data_time_used" maxlength="4"/>
				</div>
				<div class="element-inline color-defaul">
					<label class="radio-inline">
					  	<input type="radio" name="data[time_used_type]" id="radioTimeYear" value="1" checked> Năm
					</label>
					<label class="radio-inline">
					  	<input type="radio" name="data[time_used_type]" id="radioTimeHour" value="2"> Giờ
					</label>
				</div>
				<div class="category_group_warntip hide warn-time">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Hãy nhập thời gian đã hoạt động</span>
			    	</div>
				</div>
			</div>
		</div>

		<div class="posting_row forklift">
			<div class="posting_label">
				Tải trọng làm việc:
			</div>
			<div class="posting_element">
				<div class="element-main">
					<input class="form-control" name="data[work_weight]" type="text" id="data_work_weight" maxlength="12"/>
				</div>
				<div class="element-inline color-defaul">
					<label class="radio-inline">
					  	<input type="radio" name="data[work_weight_type]" id="radioWeightType" value="2" checked> Kg
					</label>
					<label class="radio-inline">
					  	<input type="radio" name="data[work_weight_type]" id="radioWeightType" value="1"> m3
					</label>
				</div>
				<div class="category_group_warntip hide warn-time">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Hãy nhập tải trọng làm việc</span>
			    	</div>
				</div>
			</div>
		</div>

		<div class="posting_row forklift">
			<div class="posting_label">
				Chiều cao (mét) :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<input class="form-control" name="data[height]" type="text" id="data_height" maxlength="12"/>
				</div>
				<div class="category_group_warntip hide">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Hãy nhập chiều cao</span>
			    	</div>
				</div>
			</div>
		</div>

		<div class="posting_row forklift">
			<div class="posting_label">
				Tải trọng riêng (kg) :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<input class="form-control" name="data[weight]" type="text" id="data_weight" maxlength="12"/>
				</div>
				<div class="category_group_warntip hide">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Hãy nhập tải trọng riêng</span>
			    	</div>
				</div>
			</div>
		</div>

		<div class="posting_row forklift">
			<div class="posting_label">
				Loại vỏ/bánh :
			</div>
			<div class="posting_element">
				<div class="element-main type_wheel">
					<label class="radio-inline">
					  	<input type="radio" name="data[wheel_type]" id="data_wheel_type1" value="1" checked> Vỏ đặc
					</label>
					<label class="radio-inline">
					  	<input type="radio" name="data[wheel_type]" id="data_wheel_type2" value="2"> Vỏ hơi
					</label>
					<label class="radio-inline">
					  	<input type="radio" name="data[wheel_type]" id="data_wheel_type3" value="3"> Bánh xích
					</label>
				</div>
				<div class="category_group_warntip">
					
				</div>
			</div>
		</div>

		<div class="posting_row forklift">
			<div class="posting_label">
				Option :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<select class="form-control" name="data[option1]" id="data_option1" style="margin-bottom: 10px;">
						<option value="0">Khác ...</option>
						<option value="1">Side shifter</option>
						<option value="2">Fork Positioner</option>
						<option value="3">Rotating Fork</option>
						<option value="4">Hinged Fork</option>
						<option value="5">Bale Clamp</option>
						<option value="6">Roll Clamp</option>
					</select>
					<input class="form-control" name="data[option2]" type="text" id="data_option2" maxlength="150"/>
				</div>
				<div class="category_group_warntip hide" style="margin-top: 40px;">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Hãy nhập option</span>
			    	</div>
				</div>
			</div>
		</div>
		
		<div class="posting_row">
			<div class="posting_label">
				Mô tả :
			</div>
			<div class="posting_element">
				<div class="element-main">
					<textarea rows="5" class="form-control" name="data[content]" id="data_content"  placeholder="Điền thông tin sản phẩm (nếu có)"></textarea>
				</div>
				<div class="category_group_warntip hide" style="margin-top: 40px;">
					<div class="warntip_triangle">&nbsp;</div>
					<div class="warntip_content">
						<span>Hãy nhập option</span>
			    	</div>
				</div>
			</div>
		</div>

		<div class="posting_row">
			<div class="posting_label">
				
			</div>
			<div class="posting_element">
				<input type="hidden" class="img_1 hdImg" name="data[img][0]"/>
				<input type="hidden" class="img_2 hdImg" name="data[img][1]"/>
				<input type="hidden" class="img_3 hdImg" name="data[img][2]"/>
				<input type="hidden" class="img_4 hdImg" name="data[img][3]"/>
				<input type="hidden" class="img_5 hdImg" name="data[img][4]"/>
				<input type="hidden" class="img_6 hdImg" name="data[img][5]"/>
				<div class="element-main">
					<button type="submit" class="btn btn-danger">Đăng tin</button>
				</div>
			</div>
		</div>
		<div>
			
		</div>
	</div>
</form>
<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
        <h4 class="modal-title" id="myModalLabel">Thông báo</h4>
      </div>
      <div class="modal-body">
       
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" data-dismiss="modal">Đóng</button>
        <!-- <button type="button" class="btn btn-primary">Save changes</button> -->
      </div>
    </div>
  </div>
</div>
